﻿using System;
using System.Data;
using System.Configuration;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace HZ.DrugTrade.Web
{
    //系统常量定义类
    public class Constants
    {
        //下拉框 全部选项文本以及Value

        /// <summary>
        /// 下拉框 全部选项文本
        /// </summary>
        public const string ALL_ITEM_TEXT = "(全部)";
        /// <summary>
        /// 下拉框 全部选项value
        /// </summary>
        public const string ALL_ITEM_VALUE = "";

        /// <summary>
        /// 默认分页大小
        /// </summary>
        public static int GRIDVIEW_PAGE_SIZE = string.IsNullOrEmpty( ConfigurationManager.AppSettings.Get("GRIDVIEW_PAGE_SIZE"))? 10: int.Parse(ConfigurationManager.AppSettings.Get("GRIDVIEW_PAGE_SIZE"));

        /// <summary>
        /// 系统用户默认密码
        /// </summary>
        public static string USER_DEFAULT_PWS = string.IsNullOrEmpty(ConfigurationManager.AppSettings.Get("USER_DEFAULT_PWS")) ? "999999" : ConfigurationManager.AppSettings.Get("USER_DEFAULT_PWS");
        /// <summary>
        /// 传递ReturnUrl的查询字符串常量
        /// </summary>
        public const string QUERYSTRING_RETURN_URL = "returnUrl";
        ///
        public const string QUERYSTRING_QUERY_CONDITION = "queryCondition";

        public const string VIEWSTATE_QUERY_CONDITION = "__QUERYCONDITION";

        public const bool SYSTEM_URL_PAGING = false;

        /// <summary>
        /// 系统当前部署区域，值为区域ID
        /// </summary>
        public static string CURRENT_DEPLOY_AREAID = string.IsNullOrEmpty(ConfigurationManager.AppSettings.Get("CURRENT_DEPLOY_AREAID")) ? "510000" : ConfigurationManager.AppSettings.Get("CURRENT_DEPLOY_AREAID");

        /// <summary>
        /// 订单过期天数
        /// </summary>
        public static int ORDER_EXPIRE_DAY = string.IsNullOrEmpty(ConfigurationManager.AppSettings.Get("ORDER_EXPIRE_DAY")) ? 7 : int.Parse(ConfigurationManager.AppSettings.Get("ORDER_EXPIRE_DAY"));



    }
}
